﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TanHuan.Authorize.DataAccess;
using TanHuan.Authorize.Model;

namespace TanHuan.Authorize.Biz
{
    public class AuthFunctionBiz
    {
        AuthFunctionDA afDA = new AuthFunctionDA();

        /// <summary>
        /// 获取AuthFunction
        /// </summary>
        /// <returns></returns>
        public List<AuthFunction> GetAuthFunction()
        {
            return afDA.GetAuthFunction();
        }

        /// <summary>
        /// 根据[ParentUnid]获取AuthFunction
        /// </summary>
        /// <param name="parentUnid"></param>
        /// <returns></returns>
        public List<AuthFunction> GetAuthFunctionByParentUnid(int parentUnid)
        {
            return afDA.GetAuthFunctionByParentUnid(parentUnid);
        }

        /// <summary>
        /// 获取一个AuthFunction实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public AuthFunction GetAuthFunctionById(int id)
        {
            return afDA.GetAuthFunctionById(id);
        }

        /// <summary>
        /// 创建一个AuthFunction实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void CreateAuthFunction(AuthFunction entity)
        {
            afDA.CreateAuthFunction(entity);
        }

        /// <summary>
        /// 删除一个AuthFunction实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void DeleteAuthFunction(int id)
        {
            afDA.DeleteAuthFunction(id);
        }

        /// <summary>
        /// 修改一个AuthApp实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void EditAuthFunction(AuthFunction entity)
        {
            afDA.EditAuthFunction(entity);
        }
    }
}
